import pytest

from api.cp_login import cpLogin
@pytest.fixture
def get_token():
    #你把登录数据写死也可以，也可以动态
    data={
        "username": "admin",
        "password": "123456"
    }
    token=cpLogin.login(data).json()['Authorization']
    headers={
        "Authorization":token
    }
    # HEADERS=
    yield headers